/*
Minims .Net Playstation 3 UPNP ContentDirectory
Copyright (C) 2008  Guillaume Plourde

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

using System;
using System.Collections.Generic;
using System.Text;

namespace minims
{
	public enum FILETYPE
	{
		System	= 0,
		Media	= 1
	}
	public class MinimsFile
	{
		FILETYPE ft;
		string name;
		string value;

		public MinimsFile(FILETYPE _ft, string _name, string _val)
		{
			this.ft = _ft;
			this.name = _name;
			this.value = _val;
		}

		public FILETYPE GetFileType { get { return ft; } }
		public string Name { get { return name; } }
		public string Value { get { return value; } }
	}
	public class FileManager
	{
		List<MinimsFile> files;
		public FileManager()
		{
			files = new List<MinimsFile>();
		}
		public void Add(MinimsFile file)
		{
			files.Add(file);
		}
		public string GetFile(string name)
		{
			foreach (MinimsFile f in files)
			{
				if (f.Name == name)
					return f.Value;
			}
			return null;
		}
	}
}
